Skip to content

feat(iop): enable exploits and rules sync (flavor) - #927

Open
vkrizan wants to merge 1 commit into
theforeman:masterfrom
vkrizan:enable-exploits-sync-sat-flavor
Open

vkrizan wants to merge 1 commit into
theforeman:masterfrom
vkrizan:enable-exploits-sync-sat-flavor

Conversation

@vkrizan

@vkrizan vkrizan commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Why are you introducing these changes? (Problem description, related links)

Satellite flavor needs to explicitly enable sync of exploits data and rules metadata.

What are the changes introduced in this pull request?

Sets iop_vulnerability_taskomatic_jobs and iop_vulnerability_taskomatic_startup variables to additionally run exploit_sync and rules_git_sync jobs in IoP Vulnerability Taskomatic.

How to test this pull request

Steps to reproduce:

  • Deploy with the Satellite flavor and IoP enable: foremanctl deploy --flavor satellite --add-feature iop
  • Check the service unit of iop-service-vuln-taskomatic.service that it includes exploit_sync and rules_git_sync jobs in env vars.
  • Check logs of the taskomatic that it runs these jobs on startup.

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Walkthrough

The Satellite flavor now configures vulnerability taskomatic job intervals and startup jobs. The test checks the Satellite job values and retains the prior expectations for other flavors. The taskomatic service description now refers to data synchronization and maintenance tasks.

Changes: Satellite vulnerability jobs

Layer / File(s) Summary
Configure and validate vulnerability job schedules
src/vars/flavors/satellite.yml, tests/feature/iop/test_vulnerability.py, docs/architecture/iop.md
Sets intervals for stale_systems, delete_systems, cacheman, exploit_sync, and rules_git_sync. Starts cacheman, exploit_sync, and rules_git_sync. The test checks the expanded Satellite job values and the existing expectations for other flavors. The service description refers to data synchronization and maintenance tasks.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: amolpati30

Merge Risk: ⚪ Minimal · up to 61379

Satellite IoP configuration now requests exploit and rules synchronization. The available evidence establishes no actionable merge-blocking issue, though it does not confirm whether the downstream image accepts those task names.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: enabling exploit and rules synchronization for the Satellite flavor.
Description check Passed The description directly explains the Satellite flavor change, its purpose, implementation, and test procedure.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

@vkrizan

vkrizan commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@ehelms @jeremylenz please review

@ehelms

ehelms commented Oct 10, 2026

Copy link
Copy Markdown
Member

Why are these special to the flavor?

@vkrizan

vkrizan commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

@ehelms the data are only provided to the satellite flavor only.

Comment on lines +42 to +43
iop_vulnerability_taskomatic_jobs: "stale_systems:5,delete_systems:30,cacheman:5,exploit_sync:1440,rules_git_sync:1440"
iop_vulnerability_taskomatic_startup: "cacheman,exploit_sync,rules_git_sync"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is specific to the Satellite flavor, could you please mention that explicitly? This would help prevent confusion in the future.

Suggested change
iop_vulnerability_taskomatic_jobs: "stale_systems:5,delete_systems:30,cacheman:5,exploit_sync:1440,rules_git_sync:1440"
iop_vulnerability_taskomatic_startup: "cacheman,exploit_sync,rules_git_sync"
# Satellite provides exploit data and rules metadata, so enable the
# vulnerability taskomatic sync jobs for those datasets in this flavor.
iop_vulnerability_taskomatic_jobs: "stale_systems:5,delete_systems:30,cacheman:5,exploit_sync:1440,rules_git_sync:1440"
iop_vulnerability_taskomatic_startup: "cacheman,exploit_sync,rules_git_sync"

@amolpati30

Copy link
Copy Markdown
Contributor

In the steps to reproduce, you mentioned "Deploy with satellite flavor." However, in the current upstream src/vars/flavors/satellite.yml, the Satellite flavor does not include iop by default. Therefore, this change only affects deployments where IoP is explicitly enabled.

The PR test plan currently says:

Deploy with satellite flavor

I would suggest making it more precise:

Deploy with Satellite flavor and IoP enabled:

foremanctl deploy --flavor satellite --add-feature iop

This makes it clear that IoP must be explicitly enabled to reproduce the issue.

@amolpati30

Copy link
Copy Markdown
Contributor

This test needs to be updated to reflect the changes.

def test_vulnerability_taskomatic_environment_variables(server, obsah_params):
    result = server.run("podman inspect iop-service-vuln-taskomatic --format '{{.Config.Env}}'")
    assert result.succeeded
    assert "IS_FEDRAMP=true" in result.stdout
    if obsah_params.get("flavor") == "satellite":
        assert "JOBS=stale_systems:5,delete_systems:30,cacheman:5,exploit_sync:1440,rules_git_sync:1440" in result.stdout
        assert "JOBS_STARTUP=cacheman,exploit_sync,rules_git_sync" in result.stdout
    else:
        assert "JOBS=stale_systems:5,delete_systems:30,cacheman:5" in result.stdout
        assert "JOBS_STARTUP=cacheman" in result.stdout

@amolpati30

Copy link
Copy Markdown
Contributor

The docs currently mention taskomatic as running only:

  stale_systems, delete_systems, cacheman

File:

  docs/architecture/iop.md

Current line found:

  | `iop-service-vuln-taskomatic` | service | Periodic job scheduler (stale_systems, delete_systems, cacheman) |

Suggested update:

  | `iop-service-vuln-taskomatic` | service | Periodic job scheduler. Default jobs are `stale_systems`, `delete_systems`, and `cacheman`; Satellite flavor also enables `exploit_sync` and `rules_git_sync`. |

@ehelms

ehelms commented Oct 12, 2026

Copy link
Copy Markdown
Member

@ehelms the data are only provided to the satellite flavor only.

Not the flavor since it lives here. I assume you mean only present in the RH images?

@vkrizan

vkrizan commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

@amolpati30 Updated. Thanks for the review.

Not the flavor since it lives here. I assume you mean only present in the RH images?

@ehelms yes, downstream images.

Sets iop_vulnerability_taskomatic_jobs and
iop_vulnerability_taskomatic_startup to do exploit_sync and rules_git_sync.
@vkrizan
vkrizan force-pushed the enable-exploits-sync-sat-flavor branch from 44deacd to 6137948 Compare October 13, 2026 10:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔇 Additional comments (3)
src/vars/flavors/satellite.yml (1)

38-47: LGTM!

tests/feature/iop/test_vulnerability.py (1)

96-105: LGTM!

docs/architecture/iop.md (1)

137-137: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Document the Satellite-specific jobs.

The description is now generic. It no longer names the jobs that run. Readers cannot tell that exploit_sync and rules_git_sync run only for the Satellite flavor. The PR discussion requested this detail. Name the default jobs and the Satellite-only jobs.

📝 Proposed fix
-| `iop-service-vuln-taskomatic` | service | Periodic job scheduler for data synchronization and maintenance tasks |
+| `iop-service-vuln-taskomatic` | service | Periodic job scheduler. Runs `stale_systems`, `delete_systems`, and `cacheman`. The Satellite flavor also runs `exploit_sync` and `rules_git_sync` |

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f69b93f-c91f-4651-983a-5d0b158fa17b
📥 Commits

Reviewing files that changed from the base of the PR and between 44deacd and 6137948.

📒 Files selected for processing (3)
  • docs/architecture/iop.md
  • src/vars/flavors/satellite.yml
  • tests/feature/iop/test_vulnerability.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@vkrizan

vkrizan commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Latest errors from the pipelines (those need retry):

srpm:

2026-10-13 10:07:07.152 logging.py        INFO   [ERROR]: Error when getting collection version metadata for community.postgresql:5.0.0 from default (https://galaxy.ansible.com/api/) (HTTP Code: 504, Message: Gateway Timeout Code: Unknown)

and regular test on setup Vagrant

TimeoutError: [Errno 110] Connection timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants